1. Field of the Invention
The present invention is related to the field of designing filters for filtering image data, and more specifically to methods, software and devices for designing a scalable image filter with integer coefficients for image scaling operations.
2. Description of the Related Art
Video display applications receive image data to produce an image. Often the source size and format of the image data does not match the display size and format. For such applications, images must be resized.
A number of digital processing techniques exist for resizing images, using their image data. Resizing is specified in terms of a scaling ratio M:N. One common method is now described.
Referring to FIG. 1, a method for resizing images in one dimension is described, called multirate resampling. In the first row there are shown input pixel values A , B, C, . . . . It is desired to perform M:N (5:3) multirate resampling.
The input pixel values are upsampled. This is accomplished by inserting Nxe2x88x921 (i.e. 2) zeros between each pair of them. The upsampled pixels are then filtered using an intermediate filter. The intermediate filter has a nominal cutoff frequency xcfx89S given by Equation (1).
xcfx89S=min [xcfx80/M,xcfx80/N]xe2x80x83xe2x80x83Equation (1)
This generates the filtered samples a, axe2x80x2, axe2x80x3, b, bxe2x80x2, bxe2x80x3, . . . . These are also called the upsampled pixels.
Afterwards, every M-th (i.e. every 5th) pixel of the filtered upsampled pixels is output for the final values. It should be noted that, for every five (M) input pixel values, there are three (N) output pixel values.
While this is the general process, further efficiencies are gained as follows. If the intermediate filter is a Finite Impulse Response (FIR) filter, i.e. a causal filter, then filtering needs to be performed only at the output pixel locations. A causal FIR filter is one for which                                           p            out                    ⁡                      (            i            )                          =                              ∑            j                          xe2x80x83                                ⁢                      xe2x80x83                    ⁢                                    coeff              ⁡                              (                j                )                                      ⁢                                          p                in                            ⁡                              (                j                )                                                                        Equation  (2)            
the output pout(i) is a linear combination of the input values, according to Equation (2).
The summation for the coefficients coeff(j) runs, for a K-tap filter, from coeff(xe2x88x92K/2) to coeff(+K/2).
A further efficiency is that, since the upsampled pixel values contain many zero values, only a fraction of the computations need be performed.
A number of techniques exist for designing FIR filters, to capitalize on the above-described efficiencies. These design methods, however result in filters with real, rather than integer coefficients.
The present invention overcomes these problems and limitations of the prior art.
Generally, the present invention provides methods and software for designing scalable image FIR filters with integer coefficients. In addition, it provides devices that perform the method, such as by running the software. Such devices include purpose-built VLSI circuits, general-purpose digital signal processing chips, and general-purpose computers.
In the method of the invention, a template FIR filter is designed for the desired scaling operation. Then an ideal filter is designed from the template filter.
Then a scalable skeleton filter is designed, having integer coefficients and approximating the template FIR filter. A finite domain of integers is then defined around each integer coefficient. This determines a finite universe of possible combinations of coefficients, and thus also respective available test filters.
The available test filters are first screened for meeting an integer normalization requirement. Those that do not meet it within a preset tolerance are rejected. Then, the remaining available test filters are preferably ranked according to performance in terms of filter parameters.
Then the best ranked test filters are evaluated against the ideal filter. Evaluation against the ideal filter is performed by comparing images. A sample image is filtered by the ideal filter to provide a reference image, and also by the screened test filters to provide the test images. The test images are evaluated preferably by a predictive model. The one that is predicted to produce the fewest differences also determines which filter is chosen, from those available in the finite universe.
A filter designed by the invention is superior to those in prior art. Indeed, by designing filters having integer coefficients, a division for normalization is performed only by shifting, which expedites the process. Additionally, as will be appreciated from the description below, the performance is higher. A filter designed according to the present invention produces artifact free images from arbitrary input.
The present invention can be used to design filters for resizing images in various applications. For example, images in HDTV high resolution can be resized for showing on an NTSC display, and images in SVGA can be resized for showing on a VGA projector.